<?php $this->load('header')?>

<script type="text/javascript">
$(function () {
	$(".tab a").each(function () {
		$(this).click(function () {
			$(".tab a").each(function(){
				$(this).attr('class','');
				$("#tab_" + $(this).attr('id')).css('display','none');
			});
			$(this).attr('class', 'on');
			$("#tab_" + $(this).attr('id')).css('display','block');

		});
	});
});
</script>

<div class="tab">
	<ul>
		<li><a href="#" class="on" id="base">基本设置</a></li>
		<li><a href="#" id="seo">SEO设置</a></li>
		<li><a href="#" id="display">显示设置</a></li>
		<li><a href="#" id="upload">上传设置</a></li>
		<li><a href="#" id="user">用户设置</a></li>
		<li><a href="#" id="mail">邮件设置</a></li>
		<li><a href="#" id="myvar">自定义变量</a></li>
	</ul>
</div>

<div class="main">

	<form name="s" method="post" action="?mod=config&ac=save">
		<table width="100%">
		<tr><td>

			<div id="tab_base">
			<table class="sub">
				<tr>
					<td width="150" align="right">博客名称：</td>
					<td><input type="text" name="base[blogname]" size="40" value="<?php echo $base['blogname']?>" /></td>
				</tr>
				<tr>
					<td align="right">博客说明：</td>
					<td><input type="text" name="base[blogexplain]" size="40" value="<?php echo $base['blogexplain']?>" /></td>
				</tr>
				<tr>
					<td align="right">博客地址：</td>
					<td><input type="text" name="base[blogurl]" size="40" value="<?php echo $base['blogurl']?>" />
					<span>可使用{host}让系统自动捕获域名，如：http://{host}/blog</span>
					</td>
				</tr>
				<tr>
					<td align="right">时区设置：</td>
					<td>
					<select name="base[timezone]">
					<option value="-12" <?php echo $tz_012?>>(标准时-12:00) 日界线西</option>
					<option value="-11" <?php echo $tz_011?>>(标准时-11:00) 中途岛、萨摩亚群岛</option>
					<option value="-10" <?php echo $tz_010?>>(标准时-10:00) 夏威夷</option>
					<option value="-9" <?php echo $tz_09?>>(标准时-9:00) 阿拉斯加</option>
					<option value="-8" <?php echo $tz_08?>>(标准时-8:00) 太平洋时间(美国和加拿大)</option>
					<option value="-7" <?php echo $tz_07?>>(标准时-7:00) 山地时间(美国和加拿大)</option>
					<option value="-6" <?php echo $tz_06?>>(标准时-6:00) 中部时间(美国和加拿大)、墨西哥城</option>
					<option value="-5" <?php echo $tz_05?>>(标准时-5:00) 东部时间(美国和加拿大)、波哥大</option>
					<option value="-4" <?php echo $tz_04?>>(标准时-4:00) 大西洋时间(加拿大)、加拉加斯</option>
					<option value="-3.5" <?php echo $tz_035?>>(标准时-3:30) 纽芬兰</option>
					<option value="-3" <?php echo $tz_3?>>(标准时-3:00) 巴西、布宜诺斯艾利斯、乔治敦</option>
					<option value="-2" <?php echo $tz_2?>>(标准时-2:00) 中大西洋</option>
					<option value="-1" <?php echo $tz_01?>>(标准时-1:00) 亚速尔群岛、佛得角群岛</option>
					<option value="0" <?php echo $tz_0?>>(格林尼治标准时) 西欧时间、伦敦、卡萨布兰卡</option>
					<option value="1" <?php echo $tz_1?>>(标准时+1:00) 中欧时间、安哥拉、利比亚</option>
					<option value="2" <?php echo $tz_2?>>(标准时+2:00) 东欧时间、开罗，雅典</option>
					<option value="3" <?php echo $tz_3?>>(标准时+3:00) 巴格达、科威特、莫斯科</option>
					<option value="3.5" <?php echo $tz_35?>>(标准时+3:30) 德黑兰</option>
					<option value="4" <?php echo $tz_4?>>(标准时+4:00) 阿布扎比、马斯喀特、巴库</option>
					<option value="4.5" <?php echo $tz_45?>>(标准时+4:30) 喀布尔</option>
					<option value="5" <?php echo $tz_5?>>(标准时+5:00) 叶卡捷琳堡、伊斯兰堡、卡拉奇</option>
					<option value="5.5" <?php echo $tz_55?>>(标准时+5:30) 孟买、加尔各答、新德里</option>
					<option value="6" <?php echo $tz_6?>>(标准时+6:00) 阿拉木图、 达卡、新亚伯利亚</option>
					<option value="7" <?php echo $tz_7?>>(标准时+7:00) 曼谷、河内、雅加达</option>
					<option value="8" <?php echo $tz_8?>>(北京时间) 北京、重庆、香港、新加坡</option>
					<option value="9" <?php echo $tz_9?>>(标准时+9:00) 东京、汉城、大阪、雅库茨克</option>
					<option value="9.5" <?php echo $tz_95?>>(标准时+9:30) 阿德莱德、达尔文</option>
					<option value="10" <?php echo $tz_10?>>(标准时+10:00) 悉尼、关岛</option>
					<option value="11" <?php echo $tz_11?>>(标准时+11:00) 马加丹、索罗门群岛</option>
					<option value="12" <?php echo $tz_12?>>(标准时+12:00) 奥克兰、惠灵顿、堪察加半岛</option>
					</select>
					<span>当前时间：<?php echo get_date(NOW)?></span>
					</td>
				</tr>
				<tr>
					<td align="right">博客状态：</td>
					<td>
					<input type="radio" name="base[blogstatus]" value="1" id="blogstatus1" class="radio" onclick="$('#close_reason').hide()" <?php if ($base['blogstatus']==1) echo 'checked="checked"' ?> /><label for="blogstatus1">开放</label>
					<input type="radio" name="base[blogstatus]" value="2" id="blogstatus2" class="radio" onclick="$('#close_reason').hide()" <?php if ($base['blogstatus']==2) echo 'checked="checked"' ?> /><label for="blogstatus2">仅对会员开放</label>
					<input type="radio" name="base[blogstatus]" value="0" id="blogstatus0" class="radio" onclick="$('#close_reason').show()" <?php if (!$base['blogstatus']) echo 'checked="checked"' ?> /><label for="blogstatus0">关闭</label></td>
				</tr>
				<tbody id="close_reason" <?php if ($base['blogstatus']!=0) echo 'style="display:none"';?>>
				<tr>
					<td align="right">原因说明：</td>
					<td>
					<textarea name="base[closereason]" cols="50" rows="5"><?php echo $base['closereason']?></textarea>
					</td>
				</tr>
				</tbody>
				<tr>
					<td align="right">GZIP压缩：</td>
					<td><input type="radio" name="base[obstart]" value="1" id="obstart1" class="radio" <?php if ($base['obstart']) echo 'checked="checked"' ?> /><label for="obstart1">开启</label> <input type="radio" name="base[obstart]" value="0" id="obstart0" class="radio" <?php if (!$base['obstart']) echo 'checked="checked"' ?> /><label for="obstart0">关闭</label></td>
				</tr>
				<tr>
					<td align="right">开启页面缓存：</td>
					<td><input type="radio" name="base[cachepage]" value="1" id="cachepage1" class="radio" <?php if ($base['cachepage']) echo 'checked="checked"' ?> onclick="$('#cache_mod').show()" /><label for="cachepage1">开启</label> <input type="radio" name="base[cachepage]" value="0" id="cachepage0" class="radio" <?php if (!$base['cachepage']) echo 'checked="checked"' ?>  onclick="$('#cache_mod').hide()" /><label for="cachepage0">关闭</label></td>
				</tr>
				<tbody id="cache_mod" <?php if (!$base['cachepage']) echo 'style="display:none"' ?>>
				<tr>
					<td align="right">要缓存的页面：</td>
					<td>
					<input type="checkbox" name="base[cachemode][]" class="checkbox" value="index" id="c_index" <?php if (in_array('index',$base['cachemode'])) echo 'checked'; ?> /> <label for="c_index">首页列表</label>
					<input type="checkbox" name="base[cachemode][]" class="checkbox" value="cate" id="c_cate" <?php if (in_array('cate',$base['cachemode'])) echo 'checked'; ?> /> <label for="c_cate">分类列表</label>
					<input type="checkbox" name="base[cachemode][]" class="checkbox" value="post" id="c_post" <?php if (in_array('post',$base['cachemode'])) echo 'checked'; ?> /> <label for="c_post">文章内容</label>
					</td>
				</tr>
				<tr>
					<td align="right">缓存更新间隔：</td>
					<td><input type="text" name="base[cachetime]" size="10" value="<?php echo $base['cachetime']?>" /><span>秒</span></td>
				</tr>
				</tbody>
			</table>
			</div>

			<div id="tab_seo" style="display:none">
			<table class="sub">
				<tr>
					<td width="150" align="right">博客关键字：</td>
					<td><input type="text" name="seo[keywords]" size="40" value="<?php echo $seo['keywords']?>" /><span>设置Meta标签的关键字，用英文逗号分隔</span></td>
				</tr>
				<tr>
					<td align="right">博客描述：</td>
					<td>
					<textarea name="seo[description]" cols="50" rows="5"><?php echo $seo['description']?></textarea>
					<span>设置Meta标签的描述信息</span>
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">固定链接：</td>
					<td>
					<input type="radio" name="seo[urlmode]" class="radio" onclick="$('#urlsuffix').hide()"  id="urlmode0" value="0" <?php if (!$seo['urlmode']) echo 'checked="checked"' ?> />
					<label for="urlmode0">默认形式：<?php echo $base['blogurl']?>/index.php?p=123</label>

					<br />

					<input type="radio" name="seo[urlmode]" class="radio" onclick="$('#urlsuffix').show()" id="urlmode1" value="1" <?php if ($seo['urlmode']==1) echo 'checked="checked"' ?> />
					<label for="urlmode1">伪静态 (需要服务器支持)：<?php echo $base['blogurl']?>/post/123</label>
				</tr>
				<tbody id="urlsuffix" <?php if (!$seo['urlmode']) {echo 'style="display:none"';} ?>>
				<tr>
					<td align="right" valign="top">添加URL后缀：</td>
					<td>
					<input type="radio" name="seo[urlsuffix]" class="radio" value="1" id="urlsuffix1" <?php if ($seo['urlsuffix']) {echo 'checked';}?> /><label for="urlsuffix1">是</label>
					<input type="radio" name="seo[urlsuffix]" class="radio" value="0" id="urlsuffix0" <?php if (!$seo['urlsuffix']) {echo 'checked';}?> /><label for="urlsuffix0">否</label>
					<br />
					<span>添加.html后缀，让你的url看起来更像静态文件</span>
					</td>
				</tr>
				</tbody>
			</table>
			</div>

			<div id="tab_display" style="display:none">
			<table class="sub">
				<tr>
					<td width="150" align="right">日期显示格式：</td>
					<td><input type="text" name="display[timeformat]" size="10" value="<?php echo $display['timeformat']?>" /><span>例: Y-m-d H:i</span></td>
				</tr>
				<tr>
					<td align="right">每页显示文章数量：</td>
					<td><input type="text" name="display[pagesize]" size="10" value="<?php echo $display['pagesize']?>" /><span>篇</span></td>
				</tr>
				<tr>
					<td align="right">文章最多显示评论数量：</td>
					<td><input type="text" name="display[comment_limit]" size="10" value="<?php echo $display['comment_limit']?>" /><span>条 (可避免评论过多导致页面显示缓慢，留空或0时显示所有)</span></td>
				</tr>
				<tr>
					<td align="right">图片自动缩放宽度：</td>
					<td><input type="text" name="display[image_resize_width]" size="10" value="<?php echo $display['image_resize_width']?>" /><span>单位：像素</span></td>
				</tr>
				<tr>
					<td align="right">评论倒序输出：</td>
					<td><input type="radio" name="display[reverse_order]" value="1" class="radio" id="reverse1" <?php if ($display['reverse_order']) echo 'checked="checked"' ?> /><label for="reverse1">开启</label> <input type="radio" name="display[reverse_order]" value="0" class="radio" id="reverse0" <?php if (!$display['reverse_order']) echo 'checked="checked"' ?> /><label for="reverse0">关闭</label></td>
				</tr>
				<tr>
					<td align="right">开启自动摘要：</td>
					<td><input type="radio" name="display[auto_excerpt]" value="1" class="radio" id="reverse1" <?php if ($display['auto_excerpt']) echo 'checked="checked"' ?> /><label for="reverse1">开启</label> <input type="radio" name="display[auto_excerpt]" value="0" class="radio" id="reverse0" <?php if (!$display['auto_excerpt']) echo 'checked="checked"' ?> /><label for="reverse0">关闭</label>
					</td>
				</tr>
			</table>
			</div>

			<div id="tab_upload" style="display:none">
			<table class="sub">
				<tr>
					<td width="150" align="right">附件存放目录规则：</td>
					<td><input type="text" name="upload[uploaddir]" size="40" value="<?php echo $upload['uploaddir']?>" /><span>可用变量{y}、{m}、{d} 分别代表年月日</span></td>
				</tr>
				<tr>
					<td align="right">允许上传文件类型：</td>
					<td><input type="text" name="upload[uploadtype]" size="40" value="<?php echo $upload['uploadtype']?>" /><span>用|分隔，如jpg|png</span></td>
				</tr>
				<tr>
					<td align="right">允许上传文件大小：</td>
					<td><input type="text" name="upload[uploadsize]" size="10" value="<?php echo $upload['uploadsize']?>" /><span>KB，1MB = 1024 KB</span></td>
				</tr>
				<tr>
					<td align="right">自动调整图片大小：</td>
					<td><input type="radio" name="upload[autoresize]" value="1" class="radio" id="autoresize1" onclick="$('#autoresize').show()" <?php if ($upload['autoresize']) echo 'checked="checked"' ?> /><label for="autoresize1">开启</label> <input type="radio" name="upload[autoresize]" value="0" class="radio" id="autoresize0" onclick="$('#autoresize').hide()" <?php if (!$upload['autoresize']) echo 'checked="checked"' ?> /><label for="autoresize0">关闭</label></td>
				</tr>
				<tbody id="autoresize" <?php if (!$upload['autoresize']) echo 'style="display:none"';?>>
				<tr>
					<td align="right">最大图片宽度：</td>
					<td>
					<input type="text" name="upload[resizewidth]" size="10" value="<?php echo $upload['resizewidth']?>" /><span>px</span>
					</td>
				</tr>
				<tr>
					<td align="right">最大图片高度：</td>
					<td>
					<input type="text" name="upload[resizeheight]" size="10" value="<?php echo $upload['resizeheight']?>" /><span>px</span>
					</td>
				</tr>
				<tr>
					<td align="right">是否固定尺寸：</td>
					<td>
					<input type="radio" name="upload[resizefix]" value="1" class="radio" id="resizefix1" onclick="$('#resizefix').show()" <?php if ($upload['resizefix']) echo 'checked="checked"' ?> /><label for="resizefix1">是</label> <input type="radio" name="upload[resizefix]" value="0" class="radio" id="resizefix0" onclick="$('#resizefix').hide()" <?php if (!$upload['resizefix']) echo 'checked="checked"' ?> /><label for="resizefix0">否</label> <span>将会对图片进行裁剪，建议选“否”</span>
					</td>
				</tr>
				</tbody>
				<tr>
					<td align="right">上传图片添加水印：</td>
					<td><input type="radio" name="upload[watermark]" value="1" class="radio" id="watermark1" onclick="$('#watermark_info').show()" <?php if ($upload['watermark']) echo 'checked="checked"' ?> /><label for="watermark1">开启</label> <input type="radio" name="upload[watermark]" value="0" class="radio" id="watermark0" onclick="$('#watermark_info').hide()" <?php if (!$upload['watermark']) echo 'checked="checked"' ?> /><label for="watermark0">关闭</label></td>
				</tr>
				<tbody id="watermark_info" <?php if (!$upload['watermark']) echo 'style="display:none"';?>>
				<tr>
					<td align="right">水印位置：</td>
					<td>
					<input type="radio" name="upload[waterpos]" class="radio" value="0" id="pos0" <?php if ($upload['waterpos'] == 0) echo 'checked="checked"' ?> /><label for="pos0">随机位置</label><br />
					<input type="radio" name="upload[waterpos]" class="radio" value="1" id="pos1" <?php if ($upload['waterpos'] == 1) echo 'checked="checked"' ?> /><label for="pos1">顶部居左</label>
					<input type="radio" name="upload[waterpos]" class="radio" value="2" id="pos2" <?php if ($upload['waterpos'] == 2) echo 'checked="checked"' ?> /><label for="pos2">顶部居中</label>
					<input type="radio" name="upload[waterpos]" class="radio" value="3" id="pos3" <?php if ($upload['waterpos'] == 3) echo 'checked="checked"' ?> /><label for="pos3">顶部居右</label><br />
					<input type="radio" name="upload[waterpos]" class="radio" value="4" id="pos4" <?php if ($upload['waterpos'] == 4) echo 'checked="checked"' ?> /><label for="pos4">底部居左</label>
					<input type="radio" name="upload[waterpos]" class="radio" value="5" id="pos5" <?php if ($upload['waterpos'] == 5) echo 'checked="checked"' ?> /><label for="pos5">底部居中</label>
					<input type="radio" name="upload[waterpos]" class="radio" value="6" id="pos6" <?php if ($upload['waterpos'] == 6) echo 'checked="checked"' ?> /><label for="pos6">底部居右</label>
					</td>
				</tr>
				<tr>
					<td align="right">水印透明度：</td>
					<td><input type="text" name="upload[watertrans]" size="10" value="<?php echo $upload['watertrans']?>" /><span>百分比，为0时水印不可见</span></td>
				</tr>
				<tr>
					<td align="right">水印图片：</td>
					<td><input type="text" name="upload[waterpic]" size="30" value="<?php echo $upload['waterpic']?>" />
					<?php
					if ( is_file(JBLOG_ROOT.$upload['waterpic']) ) {
						echo '<img src="'.$upload['waterpic'].'" />';
					} else {
						echo '<span style="color:red">水印图片不存在</span>';
					}
					?>
					</td>
				</tr>
				</tbody>
				<tr>
					<td align="right">开启附件防盗链：</td>
					<td><input type="radio" name="upload[remote_open]" value="0" class="radio" id="remote_open0" onclick="$('#allow_domain').show()" <?php if (!$upload['remote_open']) echo 'checked="checked"' ?> /><label for="remote_open0">开启</label> <input type="radio" name="upload[remote_open]" value="1" class="radio" id="remote_open1" onclick="$('#allow_domain').hide()" <?php if ($upload['remote_open']) echo 'checked="checked"' ?> /><label for="remote_open1">关闭</label></td>
				</tr>
				<tbody id="allow_domain" <?if ($upload['remote_open']) echo 'style="display:none"';?>>
				<tr>
					<td align="right">允许域名列表：</td>
					<td>
					<textarea name="upload[allow_domain]" cols="50" rows="5"><?php echo $upload['allow_domain']?></textarea>
					<span>多个用英文逗号","分隔，注意www.domain.com和domain.com是两个不同的域名</span>
					</td>
				</tr>
				</tbody>
			</table>
			</div>

			<div id="tab_user" style="display:none">
			<table class="sub">
				<tr>
					<td width="150" align="right">允许新用户注册：</td>
					<td>
					<input type="radio" name="user[allow_reg]" id="allow_reg1" value="1" class="radio" <?php if ($user['allow_reg']) echo 'checked="checked"' ?> /><label for="allow_reg1">开启</label> <input type="radio" name="user[allow_reg]" id="allow_reg0" value="0" class="radio" <?php if (!$user['allow_reg']) echo 'checked="checked"' ?> /><label for="allow_reg0">关闭</label>
					</td>
				</tr>
				<tr>
					<td align="right">用户登录需要验证码：</td>
					<td>
					<input type="radio" name="user[login_seccode]" id="login_seccode1" value="1" class="radio" <?php if ($user['login_seccode']) echo 'checked="checked"' ?> /><label for="login_seccode0">开启</label> <input type="radio" name="user[login_seccode]" id="login_seccode0" value="0" class="radio" <?php if (!$user['login_seccode']) echo 'checked="checked"' ?> /><label for="login_vdcode0">关闭</label>
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">注册用户名保留关键字：</td>
					<td><textarea rows="3" cols="50" name="user[banname]"><?php echo $user['banname']?></textarea><span>多个用英文逗号","分隔</span></td>
				</tr>
				<tr>
					<td align="right" valign="top">新用户注册邮件内容：</td>
					<td><textarea rows="5" cols="50" name="mail[register_mail_body]"><?php echo $mail['register_mail_body']; ?></textarea>
					<br />
					<span>
					可用变量：<br />
					{username} : 用户名, {password} : 密码, {email} : 邮件地址, {blogname} : 博客名称,<br />
					{blogurl} : 博客地址, {regtime} : 注册时间
					</span>
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">密码找回邮件内容：</td>
					<td><textarea rows="5" cols="50" name="mial[lostpassword_mail_body]"><?php echo $mail['lostpassword_mail_body']; ?></textarea>
					<br />
					<span>
					可用变量：<br />
					{username} : 用户名, {newpassword} : 新密码, {blogname} : 博客名称, <br />
					{blogurl} : 博客地址, {time} : 发送时间 , {url} : 激活链接地址
					</span>
					</td>
				</tr>
			</table>
			</div>

			<div id="tab_mail" style="display:none">
			<table class="sub">
				<tr>
					<td width="150" align="right" valign="top">邮件发送方式：</td>
					<td>
					<input type="radio" name="mail[mailsendtype]" id="mailsendtype0" onclick="$('#smtpconfig').hide()" value="0" class="radio" <?php if ( !$mail['mailsendtype'] ) { echo 'checked';} ?> /><label for="mailsendtype0">使用PHP的Mail函数发送</label><br />
					<input type="radio" name="mail[mailsendtype]" id="mailsendtype1" onclick="$('#smtpconfig').show()" value="1" class="radio" <?php if ( $mail['mailsendtype'] ) { echo 'checked';} ?> /><label for="mailsendtype1">使用SMTP方式发送</label>
					</td>
				</tr>
				<tbody id="smtpconfig" <?php if ( !$mail['mailsendtype'] ) { echo 'style="display:none"';} ?>>
				<tr>
					<td width="150" align="right">SMTP服务器：</td>
					<td><input type="text" name="mail[smtphost]" value="<?php echo $mail['smtphost']?>" /></td>
				</tr>
				<tr>
					<td width="150" align="right">SMTP端口：</td>
					<td><input type="text" name="mail[smtpport]" value="<?php echo $mail['smtpport']?>" /> <span>默认是25</span></td>
				</tr>
				<tr>
					<td width="150" align="right">发件人姓名：</td>
					<td><input type="text" name="mail[fromname]" value="<?php echo $mail['fromname']?>" /> <span>可不填</span></td>
				</tr>
				<tr>
					<td width="150" align="right">发件人邮件地址：</td>
					<td><input type="text" name="mail[frommail]" value="<?php echo $mail['frommail']?>" /> <span>你的邮箱地址</span></td>
				</tr>
				<tr>
					<td width="150" align="right">是否需要身份验证：</td>
					<td>
					<input type="radio" name="mail[smtpauth]" id="smtpauth1" value="1" class="radio" <?php if ( $mail['smtpauth'] ) { echo 'checked';} ?> /><label for="smtpauth1">是</label>
					<input type="radio" name="mail[smtpauth]" id="smtpauth0" value="0" class="radio" <?php if ( !$mail['smtpauth'] ) { echo 'checked';} ?> /><label for="smtpauth0">否</label>
					</td>
				</tr>
				<tr>
					<td width="150" align="right">SMTP服务器是否需要安全连接(SSL)：</td>
					<td>
					<input type="radio" name="mail[smtpssl]" id="smtpssl1" value="1" class="radio" <?php if ( $mail['smtpssl'] ) { echo 'checked';} ?> /><label for="smtpssl1">是</label>
					<input type="radio" name="mail[smtpssl]" id="smtpssl0" value="0" class="radio" <?php if ( !$mail['smtpssl'] ) { echo 'checked';} ?> /><label for="smtpssl0">否</label>
					</td>
				</tr>
				<tr>
					<td width="150" align="right">SMTP用户名：</td>
					<td><input type="text" name="mail[smtpuser]" value="<?php echo $mail['smtpuser']?>" /></td>
				</tr>
				<tr>
					<td width="150" align="right">SMTP密码：</td>
					<td><input type="password" name="mail[smtppassword]" value="<?php echo $mail['smtppassword']?>" /></td>
				</tr>
				</tbody>
				<tr>
					<td align="right">评论回复邮件通知：</td>
					<td>
					<input type="radio" name="mail[reply_mail]" id="reply_mail1" value="1" onclick="$('#reply_mail_config').show()" class="radio" <?php if ($mail['reply_mail']) { echo 'checked'; }?> /><label for="reply_mail1">开启</label>
					<input type="radio" name="mail[reply_mail]" id="reply_mail0" value="0" onclick="$('#reply_mail_config').hide()" class="radio" <?php if (!$mail['reply_mail']) { echo 'checked'; }?> /><label for="reply_mail0">关闭</label>
					</td>
				</tr>
				<tbody id="reply_mail_config" <?php if ( !$mail['reply_mail'] ) {echo 'style="display:none"';}?>>
				<tr>
					<td align="right" valign="top">发送选项：</td>
					<td>
					<input type="radio" name="mail[reply_mail_type]" id="reply_mail_type1" value="1" class="radio" <?php if ($mail['reply_mail_type']==1) { echo 'checked'; }?> /><label for="reply_mail_type1">所有人回复都发送邮件</label><br />
					<input type="radio" name="mail[reply_mail_type]" id="reply_mail_type2" value="2" class="radio" <?php if ($mail['reply_mail_type']==2) { echo 'checked'; }?> /><label for="reply_mail_type2">仅已登录用户回复时发送邮件</label><br />
					<input type="radio" name="mail[reply_mail_type]" id="reply_mail_type3" value="3" class="radio" <?php if ($mail['reply_mail_type']==3) { echo 'checked'; }?> /><label for="reply_mail_type3">仅文章作者或管理员回复时发送邮件</label>
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">邮件标题：</td>
					<td>
					<input type="text" name="mail[reply_mail_subject]" value="<?php echo $mail['reply_mail_subject']?>" size="60" /><br />
					<span>
					可用变量：{blogname} : 博客名称, {postname} : 文章名称, {or_author} : 被回复评论作者名称, {re_author} : 回复人名称
					</span>
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">邮件内容：</td>
					<td>
					<textarea name="mail[reply_mail_body]" rows="8" cols="60"><?php echo $mail['reply_mail_body']?></textarea><br />
					<span>
					可用变量：<br /> 
					{blogname} : 博客名称, {blogurl} : 博客地址, {postname} : 文章名称, {commenturl} : 评论链接地址, {or_author} : 被回复评论作者名称,<br />
					{or_date} : 被回复评论发表时间, {or_content} : 被回复评论内容, {re_author} : 回复人名称, {re_date} : 回复时间, {re_content} : 回复内容
					</span>
					</td>
				</tr>
				</tbody>
			</table>
			</div>

			<div id="tab_myvar" style="display:none">
			<table class="sub">
			<?php foreach ($myvar as $var => $val) { ?>
				<tr id="myvar_<?php echo $var?>">
					<td width="150" align="right" valign="top"><label title="变量名称：<?php echo $var?>"><?php echo $var?>：</label></td>
					<td>
						<textarea style="height:40px;" cols="60" name="myvar[<?php echo $var?>]"><?php echo $val?></textarea>
						[<a href="javascript:;" onclick="return del_myvar('<?php echo $var?>')">删除</a>]
					</td>
				</tr>
			<?php } ?>
				<tbody style="background:#f0f0f0">
				<tr><th align="right" colspan="2">添加自定义变量</th></tr>
				<tr>
					<td width="150" align="right">变量名：</td>
					<td>
						<input type="text" name="addvar[name]" size="40" /> <span>必须由英文字母和下划线组成</span>
					</td>
				</tr>
				<tr>
					<td width="150" align="right">变量值：</td>
					<td>
						<textarea rows="3" cols="50" name="addvar[value]"></textarea> <span>支持HTML</span>
					</td>
				</tr>
				</tbody>
				<tr>
					<td colspan="2">
					<div class="tips">
					<b style="color:red">说明：</b> <br />
					自定义变量的调用方法与调用普通配置项一样，例：<br />
					&lt;?php echo config('变量名') ?&gt; 或 &lt;?php blog('变量名') ?&gt;
					</div>
					</td>
				</tr>
			</table>
			</div>

			</td>
		</tr>
		<tr class="bg2">
			<td><input type="submit" value="  保存设置  " class="button" style="margin-left:160px" /></td>
		</tr>
	</table>
	</form>
</div>

<?php $this->load('footer')?>